package com.tzkyzj.tiremanager.dto;

import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDate;
import java.util.List;

public class TireInfo {
    private Long id;
    private String tireNumber;
    private String tireBrand;
    private String tireModel;
    private String transportCompany;
    private Integer currentMileage;
    private LocalDate installDate;
    private Double treadDepth;

    // 修复：将 List<MultipartFile> 改为 MultipartFile[] 以保持一致性
    private MultipartFile[] photos;

    // 无参构造函数
    public TireInfo() {
    }

    // 全参构造函数
    public TireInfo(Long id, String tireNumber, String tireBrand, String tireModel, String transportCompany,
                    Integer currentMileage, LocalDate installDate, Double treadDepth) {
        this.id = id;
        this.tireNumber = tireNumber;
        this.tireBrand = tireBrand;
        this.tireModel = tireModel;
        this.transportCompany = transportCompany;
        this.currentMileage = currentMileage;
        this.installDate = installDate;
        this.treadDepth = treadDepth;
    }

    // Getter 和 Setter
    public MultipartFile[] getPhotos() {
        return photos;
    }

    public void setPhotos(MultipartFile[] photos) {
        this.photos = photos;
    }

    // 其他 getter 和 setter 方法保持不变...
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTireNumber() {
        return tireNumber;
    }

    public void setTireNumber(String tireNumber) {
        this.tireNumber = tireNumber;
    }

    public String getTireBrand() {
        return tireBrand;
    }

    public void setTireBrand(String tireBrand) {
        this.tireBrand = tireBrand;
    }

    public String getTireModel() {
        return tireModel;
    }

    public void setTireModel(String tireModel) {
        this.tireModel = tireModel;
    }

    public String getTransportCompany() {
        return transportCompany;
    }

    public void setTransportCompany(String transportCompany) {
        this.transportCompany = transportCompany;
    }

    public Integer getCurrentMileage() {
        return currentMileage;
    }

    public void setCurrentMileage(Integer currentMileage) {
        this.currentMileage = currentMileage;
    }

    public LocalDate getInstallDate() {
        return installDate;
    }

    public void setInstallDate(LocalDate installDate) {
        this.installDate = installDate;
    }

    public Double getTreadDepth() {
        return treadDepth;
    }

    public void setTreadDepth(Double treadDepth) {
        this.treadDepth = treadDepth;
    }

    @Override
    public String toString() {
        return "TireInfo{" +
                "id=" + id +
                ", tireNumber='" + tireNumber + '\'' +
                ", tireBrand='" + tireBrand + '\'' +
                ", tireModel='" + tireModel + '\'' +
                ", transportCompany='" + transportCompany + '\'' +
                ", currentMileage=" + currentMileage +
                ", installDate=" + installDate +
                ", treadDepth=" + treadDepth +
                '}';
    }
}